@extends('admin.layout.layout')

@section('content')


</div>
<!-- /.row -->
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                图片添加
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-6 col-lg-offset-3">
    

                    @if (count($errors) > 0)
                        <div class="alert alert-danger">
                            <ul>
                                @foreach ($errors->all() as $error)
                                    <li>{{ $error }}</li>
                                @endforeach
                            </ul>
                        </div>
                    @endif

                        <form role="form" action="{{url('/admin/photo/insert')}}" method="post" enctype="multipart/form-data">
                       
                            <div>
                                            <label style="font-size:25px;">选择景点</label>
                                            <select name="sid" style="font-size:25px;">
                                                @foreach($cates as $k=>$v)
                                                <option value="{{$v->id}}">{{$v->name}}</option>
                                                @endforeach
                                               
                                            </select>
                                            
                            </div>
                            <span>&nbsp;</span>
                            <table>
                                <tr>
                                    <tr>
                                    <th>
                                            <div class="form-group">
                                                <label>标题&nbsp;</label>  
                                            </div>                                      
                                    </th>

                                    <th>
                                            <div class="form-group">
                                          
                                                <input type="text" name="stitle" value="{{old('username')}}">   
                                            </div>                                      
                                    </th>
                                    </tr>
                                    <tr>
                                    <th>
                                            <div class="form-group">
                                                <label>文本</label> 
                                            </div>                                      
                                        
                                    </th>
                                    <th>
                                            <div class="form-group">
                                                <textarea name="contents" id="" cols="30" rows="10"></textarea>   
                                            </div>                                      
                                    </th>
                                    </tr>
                                    <tr>
                                    <th>
                                            <div class="form-group">
                                                <label>图片</label> 
                                            </div>                                      
                                    </th>
                                    <th>
                                            <div class="form-group">

                                                <input type="file" name="photo" value="{{old('file')}}">   
                                            </div>  
                                    </th>
                                    </tr>

                                </tr>

                            </table>

                            
                            {{csrf_field()}}
                            <button  class="btn btn-primary" type="submit">添加</button>
                          
                        </form>
                    </div>
                  
                    
                </div>
                <!-- /.row (nested) -->
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div>
    <!-- /.col-lg-12 -->
</div>
@endsection
